package com.motong.gongdan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.motong.gongdan.entity.Broadcast;
import com.motong.gongdan.mapper.BroadcastMapper;
import com.motong.gongdan.vo.system.Broadcast.query.BroadcastGetListQuery;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BroadcastService extends ServiceImpl<BroadcastMapper, Broadcast> {

    @Resource
    private BroadcastMapper broadcastMapper;

    // 获取播报列表
    public Page<Broadcast> getList(BroadcastGetListQuery query) {
        Page<Broadcast> page = new Page<>(query.getPage(), query.getLimit());
        return broadcastMapper.getList(page,query);
    }
}
